package com.chance.cc.crawler.prod.command.trigger.domain.commerce.jd;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.meta.core.bean.CrawlerMetaConstant;
import com.chance.cc.crawler.prod.command.job.domain.commerce.jd.JDH5CommentCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.job.domain.commerce.jd.JDH5DetailCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.trigger.CommonCrawlerSchedulerTrigger;

public class JDCommonCrawlerScheduleTrigger extends CommonCrawlerSchedulerTrigger {


    public static void main(String[] args) {
        publishJDCommentScheduleTriggerInfo();
        publishJDDetailScheduleTriggerInfo();
    }

    public static void publishJDCommentScheduleTriggerInfo(){
        CrawlerJob crawlerJob = JDH5CommentCrawlerScheduleJob.jdCrawlerJob();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                JDH5CommentCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 10 0 * * ?",
                "京东评论每天凌晨0:10采集一次");
    }

    public static void publishJDDetailScheduleTriggerInfo(){
        CrawlerJob crawlerJob = JDH5DetailCrawlerScheduleJob.jdCrawlerJob();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                JDH5DetailCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 10 9 * * ?",
                "京东商品明细每天凌晨9:10采集一次");
    }
}
